import java.util.Stack;


public class StackTest {
static int x = 17;
static int y = 3;


	public static void main(String[] args) {
	int v,w, z;
		Stack <Integer>  myStack = new Stack();
		myStack.push(x);
		
		myStack.push(x);
		
		myStack.push(y);
		
		z = myStack.peek();
		myStack.pop();
		z = z * myStack.peek();
		myStack.push(z);
		w = myStack.peek();
		myStack.pop();
		w = w - myStack.peek();
		myStack.push(w);
		v = myStack.peek();
		System.out.println(v);
	}

}
